export const setLocal = (key,value)=>{
	if(typeof value === "object"){
		value = JSON.stringify(value)
	}
	window.localStorage.setItem(key,value)
}
export const getLocal = (key,flag)=>{
	let value = window.localStorage.getItem(key)||""
	if(flag && value){
		value = JSON.parse(value)
	}
	return value;
}